<template>
  <div class="invest">
    <Headerinfo/>
    <Header/>
    <div class="content-body">
      <div class="content-it">
        <p class="title-top" v-show="titleName">
          <span>
            {{titleName}}
          </span>
        </p>
        <transition name="slide-fade">
          <router-view></router-view>
        </transition>
      </div>
    </div>
  </div>
</template>
<script>
  import interceptors from 'common/factory/interceptors';
  import userFactory from './factory/userFactory';
  import Headerinfo from 'common/components/Headerinfo';
  import Header from 'common/components/Header';
  import CONFIG from 'common/constants/config';
  export default {
    name: 'invest',

    data () {
      return {
        imgUrl: CONFIG.imgUrl,
        titleName: '',
        titleHide: false,
        titleCustom: [
          {
            name: '项目进度',
            path: 'investSpeed'
          },
          {
            name: '修改项目',
            path: 'editproject/info'
          },
          {
            name: '投后管理',
            path: 'mutation/invested'
          },
          {
            name: '风险监控',
            path: 'mutation/risk'
          },
          {
            name: '退出监控',
            path: 'mutation/out'
          },
          {
            name: '风险监控',
            path: 'invested/InvestedOut'
          }
        ]
      };
    },

    components: {
      Header,
      Headerinfo
    },
    beforeCreate () {
      userFactory.init();
    },
    beforeMount () {
      interceptors.init();
    },
    watch: {
      '$route': 'pageChange'
    },

    mounted () {
      this.init();
    },

    methods: {
      pageChange () {
        this.init();
      },
      init () {
        this.titleInit();
      },
      titleInit () {
      }
    }
  };
</script>

<style src="assets/less/style.less"></style>
<style lang="less" scoped>
.content-it{
  padding: 20px 30px;
}
</style>
